package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_library")
load(
    "//tools:defaults.bzl",
    "markdown_to_html",
    "ng_module",
    "ng_test_library",
    "ng_web_test_suite",
)

ng_module(
    name = "badge",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    module_name = "@angular/material/badge",
    deps = [
        "@npm//@angular/common",
        "@npm//@angular/core",
        "@npm//@angular/platform-browser",
        "@npm//@angular/animations",
        "//src/cdk/a11y",
        "//src/cdk/coercion",
        "//src/material/core",
    ] + glob(["**/*.html"]),
)

sass_library(
    name = "badge_scss_lib",
    srcs = glob(["**/_*.scss"]),
    deps = [
        "//src/cdk/a11y:a11y_scss_lib",
        "//src/material/core:core_scss_lib",
    ],
)

ng_test_library(
    name = "unit_test_sources",
    srcs = glob(
        ["**/*.spec.ts"],
        exclude = ["**/*.e2e.spec.ts"],
    ),
    deps = [
        ":badge",
        "//src/material/core",
        "@npm//@angular/platform-browser",
    ],
)

ng_web_test_suite(
    name = "unit_tests",
    deps = [":unit_test_sources"],
)

markdown_to_html(
    name = "overview",
    srcs = [":badge.md"],
)

filegroup(
    name = "source-files",
    srcs = glob(["**/*.ts"]),
)
